import Vue from 'vue'
import Router from 'vue-router'

const Index = () => import('@/views/index/index')
const Pages = () => import('@/views/pages/index')
const PageAbout = () => import('@/views/pages/page_about')
const PageXc = () => import('@/views/pages/page_xc')
const News = () => import('@/views/news/lists')
const Detail = () => import('@/views/detail/detail')
const Lists = () => import('@/views/lists/lists_index')
const sixNews = () => import('@/views/sixNews/sixNews')
const Policy = () => import('@/views/policy/policy')
const ListsDetail = () => import('../views/lists/lists_detail/lists_detial')
const ListNew = () => import('@/views/list_new/list_new_index')
const ServiceDetail = () => import('@/views/list_new/service_detail')
const ServiceStatus = () => import('@/views/list_new/children/service_status')
const ServiceContent = () => import('@/views/list_new/children/ServiceContent')
const ListNewDefault = () => import('@/views/list_new/children/list_new_default')
const VideoList = () => import('@/views/video_list/video_list')
const MallList = () => import('@/views/mall/mall_list')
const Study = () => import('@/views/study/study')
const Score = () => import('@/views/score/score_list')
const RedList = () => import('@/views/score/children/RedList')
const BlackList = () => import('@/views/score/children/BlackList')
const StarFamily = () => import('@/views/score/children/star_family')
const Ranking = () => import('@/views/score/children/ranking')
const FamilyScore = () => import('@/views/score/FamilyScore')
const PointsMall = () => import('@/views/points_mall/points_mall')
const Message = () => import('@/views/message/message')
const MsgDetail = () => import('@/views/message/msg_detail')
const Modernization = () => import('@/views/modernization/Modernization')
const MonitorVideo = () => import('@/views/modernization/children/monitorVideo')
const MdList = () => import('@/views/modernization/children/mdList')
const OurLine2 = () => import('@/views/modernization/children/OurLine')
const Video1 = () => import('@/views/video/Video1')
const Video2 = () => import('@/views/video/Video2')
const expert = () => import('@/views/pages/expert')
const WanShiTong = () => import('../views/wan_shi_tong/WanShiTong')
const XiaoWei = () => import('../views/xiaowei/XiaoWei')
const OurLine = () => import('../views/ourline/OurLine')
const AccretionStarDe = () => import('../views/score/children/AccretionStarDe')
const ZhiYuan = () => import('../views/zhiyuan/ZhiYuan')
const ScoreBank = () => import('../views/scorebank/ScoreBank')
const GridManage = () => import('../views/gridManage/gridManage')
const GridMap = () => import('../views/gridManage/children/gridMap')
const Visit = () => import('../views/gridManage/children/visit')
const VisitList = () => import('../views/gridManage/children/visitList')
const Events = () => import('../views/gridManage/events/events')
const KeyEvents = () => import('../views/gridManage/events/keyEvents')
const NormalEvents = () => import('../views/gridManage/events/normalEvents')
const KeyGroups = () => import('../views/gridManage/children/keyGroups')
const Warning = () => import('../views/gridManage/children/warning')
const EventsList = () => import('../views/gridManage/eventslist/EventsList')
const GuiJi = () => import('../views/gridManage/guiji/GuiJi')
const EventDetail = () => import('../views/gridManage/eventdatail/EventDetail')
const EventDetailAppeal = () => import('../views/gridManage/eventDetailAppeal/eventDetailAppeal')
const CommonList = () => import('../views/commonlist/CommonList')
const PointsMall2 = () => import('../views/points_mall2/points_mall2')
const DataCenter = () => import('../views/datacenter/DataCenter')
const MonitorVideos = () => import('../views/monitor_video/MonitorVideo')
const BaseOrgin = () => import('../views/base_orgin/BaseOrgin')


const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return originalPush.call(this, location).catch(err => err)
}


Vue.use(Router)

export default new Router({
  routes: [

    {
      path: '/',
      redirect: "/index"
    },


    {
      path: '/base_orgin',
      name: "BaseOrgin",
      component: BaseOrgin,
      meta: {
        title: "新改版的组织架构"
      }
    },


    {
      path: '/data_center',
      name: "DataCenter",
      component: DataCenter,
      meta: {
        title: "数字乡村数字中心"
      }
    },

    {
      path: '/m_video',
      name: "MonitorVideos",
      component: MonitorVideos,
      meta: {
        title: "监控中心"
      }
    },


    {
      path: '/common_list',
      name: "CommonList",
      component: CommonList,
      meta: {
        title: "通用列表(废弃)"
      }
    },

    {
      path: '/gridManage',
      name: "GridManage",
      component: GridManage,
      meta: {
        title: "网格管理"
      },
      children: [
        {
          path: "",
          name: "GridMap",
          component: GridMap,
          meta: {
            title: "网格地图"
          }
        },
        {
          path: "visit",
          name: "Visit",
          component: Visit,
          meta: {
            title: "走访信息"
          }
        },
        {
          path: "visitList",
          name: "VisitList",
          component: VisitList,
          meta: {
            title: "走访次数(废弃)"
          }
        },

        {
          path: "keyGroups",
          name: "KeyGroups",
          component: KeyGroups,
          meta: {
            title: "重点人群"
          }
        },
        {
          path: "warning",
          name: "Warning",
          component: Warning,
          meta: {
            title: "工作预警"
          }
        },
      ]
    },

    {
      path: "/events",
      name: "Events",
      component: Events,
      meta: {
        title: "事件处理"
      },
      children: [
        {
          path: "keyEvents",
          name: "KeyEvents",
          component: KeyEvents,
          meta: {
            title: "重点事件"
          }
        },
        {
          path: "normalEvents",
          name: "NormalEvents",
          component: NormalEvents,
          meta: {
            title: "普通事件"
          }
        }
      ]
    },

    {
      path: '/event_list',
      name: "EventsList",
      component: EventsList,
      meta: {
        title: "事件列表"
      }
    },
    {
      path: '/guiji',
      name: "GuiJi",
      component: GuiJi,
      meta: {
        title: "走访轨迹"
      }
    },

    {
      path: '/event_detail',
      name: "EventDetail",
      component: EventDetail,
      meta: {
        title: "走访列表详情"
      }
    },

    {
      path: '/event_detail_appeal',
      name: "EventDetailAppeal",
      component: EventDetailAppeal,
      meta: {
        title: "群众诉求详情"
      }
    },


    {
      path: '/zhiyuan',
      name: "ZhiYuan",
      component: ZhiYuan,
      meta: {
        title: "志愿服务"

      },
      children: [
        {
          path: "service_status",
          name: "ServiceStatus",
          component: ServiceStatus,
          meta: {
            title: "服务状态"
          }
        },
        {
          path: "service_content",
          name: "ServiceContent",
          component: ServiceContent,
          meta: {
            title: "服务内容"
          }
        },
        {
          path: "service_detail",
          name: "ServiceDetail",
          component: ServiceDetail,
          meta: {
            title: "服务状态详情"
          }
        },

        {
          path: "",
          name: "ListNewDefault",
          component: ListNewDefault,
          meta: {
            title: "服务默认"
          }
        }
      ]
    },

    {
      path: "/score",
      name: "ScoreBank",
      component: ScoreBank,
      meta: {
        title: "积分银行"
      },
      children: [
        {
          path: '',
          name: 'StarFamily',
          component: StarFamily
        },
        {
          path: 'accretion',
          name: 'AccretionStarDe',
          component: AccretionStarDe
        },
        {
          path: 'red_list',
          name: 'RedList',
          component: RedList
        },
        {
          path: 'black_list',
          name: 'BlackList',
          component: BlackList
        },
        {
          path: 'star_family',
          name: 'StarFamily',
          component: StarFamily
        },
        {
          path: 'ranking',
          name: 'Ranking',
          component: Ranking
        },
      ]
    },

    {
      path: '/xiaowei',
      name: "XiaoWei",
      component: XiaoWei,
      meta: {
        title: "小微"
      }
    },

    {
      path: '/wanshitong',
      name: "WanShiTong",
      component: WanShiTong,
      meta: {
        title: "皖事通"
      }
    },


    {
      path: "/index",
      name: "Index",
      component: Index,
      meta: {
        title: "首页"
      }
    },
    {
      path: "/expert",
      name: "expert",
      component: expert,
      meta: {
        title: "专家团队"
      }
    },

    {
      path: "/pages",
      name: "Pages",
      component: Pages,
      meta: {
        title: "单页面"
      }
    },
    {
      path: "/page_about",
      name: "PageAbout",
      component: PageAbout,
      meta: {
        title: "村情单页面"
      }
    },
    {
      path: "/page_xc",
      name: "PageXc",
      component: PageXc,
      meta: {
        title: "振兴单页面"
      }
    },
    {
      path: "/news",
      name: "News",
      component: News,
      meta: {
        title: "莲塘动态"
      }
    },
    {
      path: "/lists",
      name: "Lists",
      component: Lists,
      meta: {
        title: "文章列表"
      }
    },
    {
      path: "/sixNews",
      name: "sixNews",
      component: sixNews,
      meta: {
        title: "六讲六传"
      }
    },
    {
      path: "/policy",
      name: "Policy",
      component: Policy,
      meta: {
        title: "政策法规"
      }
    },
    {
      path: "/lists_detail",
      name: "ListsDetail",
      component: ListsDetail,
      meta: {
        title: "文章列表详情"
      }
    },

    {
      path: "/list_new",
      name: "ListNew",
      component: ListNew,
      meta: {
        title: "新时代文明实践"
      },
      redirect: 'list_new_default',
      children: [
        // {
        //   path: "service_status",
        //   name:"ServiceStatus",
        //   component: ServiceStatus,
        //   meta: {
        //     title: "服务状态"
        //   }
        // },
        {
          path: "",
          name: "OurLine",
          component: OurLine,
          meta: {
            title: "我们的队伍"
          }
        },

        // {
        //   path: "service_content",
        //   name:"ServiceContent",
        //   component: ServiceContent,
        //   meta: {
        //     title: "服务内容"
        //   }
        // },
        // {
        //   path: "service_detail",
        //   name:"ServiceDetail",
        //   component: ServiceDetail,
        //   meta: {
        //     title: "服务状态详情"
        //   }
        // },
        {
          path: "points_mall",
          name: "PointsMall",
          component: PointsMall,
          meta: {
            title: "积分商城"
          }
        },
        // {
        //   path: "",
        //   name:"ListNewDefault",
        //   component: ListNewDefault,
        //   meta: {
        //     title: "服务默认"
        //   }
        // }
      ]
    },


    {
      path: "/detail",
      name: "Detail",
      component: Detail,
      meta: {
        title: "文章详情"
      }
    },

    {
      path: "/video_list",
      name: "VideoList",
      component: VideoList,
      meta: {
        title: "视频列表"
      }
    },
    {
      path: "/mall_list",
      name: "MallList",
      component: MallList,
      meta: {
        title: "商城"
      }
    },

    {
      path: "/points_mall2",
      name: "PointsMall2",
      component: PointsMall2,
      meta: {
        title: "积分商城2"
      }
    },


    {
      path: "/study",
      name: "Study",
      component: Study,
      meta: {
        title: "学习强国"
      }
    },

    // {
    //   path: "/score",
    //   name:"Score",
    //   component: Score,
    //   meta: {
    //     title: "积分榜"
    //   },
    //   children:[
    //     {
    //       path: '',
    //       name: 'StarFamily',
    //       component: StarFamily
    //     },
    //     {
    //       path: 'red_list',
    //       name: 'RedList',
    //       component: RedList
    //     },
    //     {
    //       path: 'black_list',
    //       name: 'BlackList',
    //       component: BlackList
    //     },
    //     {
    //       path: 'star_family',
    //       name: 'StarFamily',
    //       component: StarFamily
    //     },
    //     {
    //       path: 'ranking',
    //       name: 'Ranking',
    //       component: Ranking
    //     },
    //   ]
    // },

    {
      path: "/family_score",
      name: "FamilyScore",
      component: FamilyScore,
      meta: {
        title: "家庭积分"
      }
    },


    {
      path: "/message",
      name: "Message",
      component: Message,
      meta: {
        title: "留言板"
      }
    },
    {
      path: "/msg_detail",
      name: "MsgDetail",
      component: MsgDetail,
      meta: {
        title: "留言板"
      }
    },
    {
      path: "/modernization",
      name: "Modernization",
      component: Modernization,
      meta: {
        title: "治理现代化"
      },
      children: [
        {
          path: "",
          name: "OurLine2",
          component: OurLine2,
          meta: {
            title: "我们的队伍"
          }
        },

        {
          path: 'monitorvideo',
          name: 'MonitorVideo',
          component: MonitorVideo
        },
        {
          path: 'mdList',
          name: 'MdList',
          component: MdList
        }
      ]
    },
    {
      path: "/video1",
      name: "Video1",
      component: Video1,
      meta: {
        title: "播放mp4视频"
      }
    },

    {
      path: "/video2",
      name: "Video2",
      component: Video2,
      meta: {
        title: "播放m3u8视频"
      }
    },
  ]
})
